<?php 

class Factory{

  private static $classList=[];

  public static function M($className){
  	if(!isset(static::$classList[$className]) || !is_object(static::$classList[$className])){
  		$class =$className.'Model';
  		static::$classList[$className] =new $class;

  	}
  	return static::$classList[$className];
  }

}



 ?>